<?php

namespace GuanChanghu\Enum;


/**
 * @author guanchanghu
 * Enum PayEnum
 * @method static $this alipay()
 * @method static $this weChat()
 * @method static $this wallet()
 * @method static $this artificial()
 * @method static $this unionpay()
 * @method static $this cash()
 * @method static $this bank()
 * @package GuanChanghu\Enum
 * Created on 2025/11/02 14:08
 * Created by guanchanghu
 * Email guanchanghu626@163.com
 */
class PayEnum extends BaseEnum
{
    /**
     * 支付方式 ali
     */
    public const ALIPAY = 'alipay';

    /**
     * 支付方式 weChat
     */
    public const WE_CHAT = 'weChat';

    /**
     * 支付方式 wallet
     */
    public const WALLET = 'wallet';

    /**
     * 支付方式 artificial
     */
    public const ARTIFICIAL = 'artificial';

    /**
     * 支付方式 unionpay
     */
    public const UNIONPAY = 'unionpay';

    /**
     * 支付方式 cash
     */
    public const CASH = 'cash';

    /**
     * 支付方式 bank
     */
    public const BANK = 'bank';

    /**
     * @return int[]
     */
    protected static function values(): array
    {
        return [
            'alipay' => self::ALIPAY,
            'weChat' => self::WE_CHAT,
            'wallet' => self::WALLET,
            'artificial' => self::ARTIFICIAL,
            'unionpay' => self::UNIONPAY,
            'cash' => self::CASH,
            'bank' => self::BANK,
        ];
    }

    /**
     * @return array|string[]
     */
    protected static function labels(): array
    {
        return [
            'alipay' => function_exists('__') ? __('enums.pay.driver.alipay') : '支付宝',
            'weChat' => function_exists('__') ? __('enums.pay.driver.we_chat') : '微信',
            'wallet' => function_exists('__') ? __('enums.pay.driver.wallet') : '钱包支付',
            'artificial' => function_exists('__') ? __('enums.pay.driver.artificial') : '人工支付',
            'unionpay' => function_exists('__') ? __('enums.pay.driver.unionpay') : '银联',
            'cash' => function_exists('__') ? __('enums.pay.driver.cash') : '现金',
            'bank' => function_exists('__') ? __('enums.pay.driver.bank') : '银行转账',
        ];
    }
}
